import Vue from 'vue'
import VueRouter from 'vue-router'
const Login = () => {
  return import('@/views/Login.vue')
}
const Register = () => {
  return import("@/views/Register.vue")
}
const Profile = () => {
  return import("@/views/profile/UserCenter.vue")
}
const MyCollect = () => {
  return import("@/views/profile/MyCollect.vue")
}
const EditPage = () => {
  return import('@/views/profile/Editpage.vue')
}
const MyAttention = () => {
  return import('@/views/profile/MyAttention.vue')
}
const MyComments = () => {
  return import("@/views/profile/MyComments.vue")
}
const Home = () => {
  return import("@/views/Home.vue")
}
const Test = () => {
  return import("@/views/test.vue")
}
const Main = () => {
  return import("@/views/comments/main.vue")
}
const Index = () => {
  return import("@/views/index.vue")
}
const TabColMag = () => {
  return import("@/views/TabColMag.vue")
}
const PostDetails = () => {
  return import("@/views/PostDetails.vue")
}
const MoreComment = () => {
  return import("@/views/MoreComment.vue")
}
const SearchPage = () => {
  return import("@/views/SearchPage.vue")
}





Vue.use(VueRouter)

const routes = [
  {
    path: "/test",
    component: Test
  },
  // {
  //   path: "/",
  //   component: Home
  // },

  {
    path: '/login',
    name: 'Login',
    component: Login,
    // component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  }, {
    path: '/register',
    name: "Register",
    component: Register

  }, {
    path: "/profile",
    name: "Profile",
    component: Profile
  },
  {
    path: "/edit",
    name: "Edit",
    component: EditPage

  },
  {
    path: "/attention",
    component: MyAttention
  },
  {
    path: "/",
    component: Index,
    name: "index"
  },
  {
    path: "/tabmag",
    component: TabColMag
  },
  {
    path: "/mycollect",
    name: "collect",
    component: MyCollect
  }, {
    path: "/postdetails",
    component: PostDetails
  }, {
    path: "/main",
    component: Main,
    name: "main"
  }, {
    path: "/morecomments",
    component: MoreComment,
    name: "morecomment"
  },
  {
    path: "/searchpage",
    component: SearchPage,
    name: "searchpage"
  },
  {
    path: "/mycomments",
    component: MyComments,
    name: "mycomments"
  }
]

const router = new VueRouter({
  routes
})

export default router
